<?php
session_start();
if(!$_SESSION["trv3_07"]){
	header("location:../../../login.php");
	exit;
}
require "../../../resources/v1.php";
?>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="../../../style/data_v1.css" />
</head>
<body onLoad="inicializar()">

<div id="Conteiner">
	<form id="DT" name="Datos" method ="POST" onsubmit="return false;">
			<div id="Tabla" style="overflow-y:scroll; height:380; width:850;">
				<table id="Tbl" width="830" border="1" align="center" cellpadding="1" class="Normal" cellspacing="0" bordercolor="#DBE5F1" rules="alls" frame="hsides">
					<tr bgcolor="#B6DDC7" align="center" class="SubT" height="26">
						<td width="65">Autos</td>
						<td width="65">Acta</td>
						<td width="85">Fecha</td>
						<td width="90">Documento</td>
						<td>Nombre</td>
						<td width="65">Dominio</td>
					</tr>
					<?
						$conexion = server_reconnect();
						$query = "select e.`autos`,date(e.`fech`) `fech`,e.`nro`,e.`est`,concat(i.`ape`,', ',i.`nom`) `nom`,concat(t.`tipo`,' ',i.`nro`) `doc`,ifnull(`veh`,0) `veh` from `exp` e,`inf` i,`td` t where e.`est`=10 and e.`inf`=i.`id` and i.`td`=t.`id` and e.`tip`=1";
						$result = mysql_query( $query, $conexion);
						$i = 0;
						while($mxcel = @mysql_fetch_array($result)){
							if($i){
								echo "<tr bgcolor='#D8FFE9' height='26'>";
								$i = 0;
							}else{
								echo "<tr height='26'>";
								$i = 1;
							}
							echo "<td align=\"left\">".$mxcel['autos']."</td>";
							echo "<td align=\"left\">".$mxcel['nro']."</td>";
							echo "<td align=\"center\">".$mxcel['fech']."</td>";
							echo "<td align=\"left\">".$mxcel['doc']."</td>";
							echo "<td align=\"left\">".strtoupper($mxcel['nom'])."</td>";
							
							if( $mxcel['veh']){
								$query2 = "select `dom` from `veh` where `id`=".$mxcel['veh'];
								$result2 = mysql_query( $query2, $conexion);
								$mxcel2 = @mysql_fetch_array($result2);
								echo "<td align=\"left\">".$mxcel2['dom']."</td>";
							}else{
								echo "<td align=\"left\"> </td>";
							}
							echo "</tr> \n";
						}
						server_disconnect( $conexion);
					?>
				</table>
			</div>
	</form>
</div>
</body>
</html>